UserProfile
Interfaces
UserProfileProps
Properties
className?
optional
className:string
Overrides or extends the styles applied to the component.
Default
null
editEndActions?
optional
editEndActions:ReactNode
Actions to be inserted after default user profile actions if it is my profile (edit mode)
editStartActions?
optional
editStartActions:ReactNode
Actions to be inserted before default user profile actions if it is my profile (edit mode)
endActions?
optional
endActions:ReactNode
Actions to be inserted after default user profile actions
FeedObjectProps?
optional
FeedObjectProps:FeedObjectProps
Props to spread to single feed object
Default
empty object
FeedSidebarProps?
optional
FeedSidebarProps:StickyBoxProps
Props to spread to single feed object
Default
{top: 0, bottomBoundary: `#${id}`}
id?
optional
id:string
Id of the user profile
Default
'user'
onEditClick()?
optional
onEditClick: (user
) =>void
Click handler for edit button
Parameters
Parameter | Type |
---|---|
user | SCUserType |
Returns
void
Default
null
startActions?
optional
startActions:ReactNode
Actions to be inserted before default user profile actions
user?
optional
user:SCUserType
User Object
Default
null
UserFeedProps?
optional
UserFeedProps:UserFeedProps
Props to spread to feed component
Default
{}
userId?
optional
userId:string
|number
Id of the user for filter the feed
Default
null
UserProfileHeaderProps?
optional
UserProfileHeaderProps:UserProfileHeaderProps
Props to spread to UserTagStack component
Default
{}
viewEndActions?
optional
viewEndActions:ReactNode
Actions to be inserted after default user profile actions if is not my profile (view mode)
viewStartActions?
optional
viewStartActions:ReactNode
Actions to be inserted before default user profile actions if is not my profile (view mode)
widgets?
optional
widgets:SCFeedWidgetType
[]
Widgets to be rendered into the feed
Default
[UserFollowedCategoriesWidget, UserFollowedUsersWidget]
Functions
UserProfile()
UserProfile(
inProps
):Element
API documentation for the Community-JS User Profile Template. Learn about the available props and the CSS API.
This component renders a specific user's profile template. Take a look at our demo component here
Import
import {UserProfile} from '@selfcommunity/react-templates';
Component Name
The name SCUserProfileTemplate
can be used when providing style overrides in the theme.
CSS
Rule Name | Global class | Description |
---|---|---|
root | .SCUserProfileTemplate-root | Styles applied to the root element. |
counters | .SCUserProfileTemplate-counters | Styles applied to the counters section. |
tags | .SCUserProfileTemplate-tags | Styles applied to the tags section. |
info | .SCUserProfileTemplate-info | Styles applied to the info section. |
feed | .SCUserProfileTemplate-feed | Styles applied to the feed section. |
actions | .SCUserProfileTemplate-actions | Styles applied to the actions section. |
Parameters
Parameter | Type | Description |
---|---|---|
inProps | UserProfileProps |
Returns
Element
UserProfileSkeleton()
UserProfileSkeleton():
Element
API documentation for the Community-JS User Profile Skeleton Template. Learn about the available props and the CSS API.
Import
import {UserProfileSkeleton} from '@selfcommunity/react-templates';
Component Name
The name SCUserProfileTemplate-skeleton-root
can be used when providing style overrides in the theme.
CSS
Rule Name | Global class | Description |
---|---|---|
root | .SCUserProfileTemplate-skeleton-root | Styles applied to the root element. |
Returns
Element